<template>
  <simple-layout title="购物积分、HAC换购待释放">
    <div class="content">
      <div class="time-lists">
        <div style="display: flex;justify-content: space-between;">
          <div class="money-name">可以锁仓金额</div>
          <div class="money">0</div>
        </div>
      </div>
      <div class="time-lists">
        <div style="display: flex;justify-content: space-between;">
          <div class="money-name">选择期限</div>
           <div class="money" @click="showDay()"> {{numMonth}}<i class="mui-icon mui-icon-arrowright"></i></div>
        </div>
      </div>
      <div>
       <van-button class="submit-btn" type="default" @click="releaseLog()">确定锁仓</van-button></div>
       <div style="margin-top: 40px!important;">
          <van-button class="submit-btn" @click="releaseLog(2)">待释放</van-button></div>
       </div>
    </div>

    <van-action-sheet
      class="sheet-day"
      v-model="show"
      :actions="actions"
      @select="onSelect"
    />
  </simple-layout>
</template>

<script>
  import SimpleLayout from "../../components/SimpleLayout";

     import lockservice from '../../service/lock';
  export default {
    name: "Login",
    components: {
      //someComponent
      SimpleLayout
    },
    props: {},
    data() {
      return {
        show: false,
        numMonth: '3个月',
        actions: [
           { name: '3个月' },
           { name: '6个月' },
           { name: '12个月' }
         ],
        transferfilter:{
          pageSize:10,
          pageNum:1
        },
        transferList:[]
      };
    },
    computed: {},
    watch: {},
    mounted: function() {
      this.getProductList()
    },
    methods: {
      getProductList(){
        lockservice.certificate(this.transferfilter).then(res=>{
          console.log(res)
          if(res.status == 200){
            // this.transferList = this.transferList.concat(res.resultData.list);
          }
        })
      },
     showDay() {
       this.show = true;
     },
     onSelect(item) {
            // 点击选项时默认不会关闭菜单，可以手动关闭
            this.show = false;
            this.numMonth = item.name
      },
      releaseLog(key) {
          if(key === 2) {
            this.$router.push({ name: 'haclock', params: { userId: 'hac' }})
          }
      }
    }
  };
</script>


<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.content {
  height: 100vh;
  background-color: #f3f4f6;
}
.time-lists {
  padding: 0 10px 10px 10px;
  color: #999;
  background-color: #fff;
}

div.time-lists {
  border-top: 1px solid rgba(153, 153, 153, 0.5);
  height: 48px;line-height: 48px;
}

.time-title {
  border-bottom: 1px solid rgba(153, 153, 153, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.time-title + div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  line-height: 2;
}

.money-title{
  text-align: left;
}

.money-name {
  color: #7681AE;
  font-size: 16px;
  font-weight: bold;
}

.money {
  color: #333;
  font-size: 16px;
  font-weight: bold;
}

.out {
  color: red;
  font-size: 16px;
  font-weight: bold;
}

.in {
  color: #3885FF;
  font-size: 16px;
  font-weight: bold;
}
button.submit-btn {
  margin:28% 10% 2%;
  width: 80%;
  border-radius: 30px;
  background:#7B7FEE;
  background: -webkit-linear-gradient(to right, #696BE2, #7B7FEE, #8E93F9); /* Safari 5.1 - 6.0 */
  background: -moz-linear-gradient(to right, #696BE2, #7B7FEE, #8E93F9); /* Firefox 3.6 - 15 */
  background: linear-gradient(to right, #696BE2, #7B7FEE, #8E93F9); /* 标准的语法 */
  color: #fff;
  height: 52px;
  font-size: 18px;
}
.sheet-day .van-action-sheet {
  max-height: 40%;
}
</style>
